import { DataTypes } from 'sequelize'
import { sequelize } from '../db/sequelize.js'

export const Book = sequelize.define('books', {
  id: {
    type: DataTypes.INTEGER,
    primaryKey: true,
    autoincrements: true
  },
  bookname: {
    type: DataTypes.STRING
  },
  author: {
    type: DataTypes.STRING
  },
  descriptions: {
    type: DataTypes.STRING
  }
})

export const sync = function () {
  sequelize.sync()
}